<!--
 * relative     : \src\components\drawerSwitch.vue
 * Author       : 郭鹏超
 * Date         : 2025-03-08 15:57
 * LastEditors  : 郭鹏超
 * LastEditTime : 2025-03-10 10:32
 * Description  : 实现抽屉功能组件
 * CodeIterationRecord: 
 -->
<template>
  <i :class="['iconfont icon-show-sidebar drawer-switch-row', className]" @click="toggleDrawer"></i>
</template>

<script setup lang="ts">
const switchFlag = defineModel({
  type: Boolean,
  default: false
});
const className = computed(() => {
  return !switchFlag.value ? "" : "transform-rotate-180 rounded-0px rounded-l-5px";
});
// 切换抽屉的展开/收起状态
const toggleDrawer = () => {
  switchFlag.value = !switchFlag.value;
};
</script>
